import 'package:flutter/material.dart';
import 'package:wechat/search.dart';
import './app.dart';
import './loading.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

void main() {
  runApp(MaterialApp(
    debugShowCheckedModeBanner: false,
    title: 'WeChat',
    theme: _themeData,
    routes: <String, WidgetBuilder>{
      "app": (BuildContext context) => new App(),
      "/friends": (_) => new WebviewScaffold(
            url: 'https://weixin.qq.com',
            appBar: new AppBar(
              title: Text('微信朋友圈'),
            ),
            withZoom: true,
            withLocalStorage: true,
          ),
      "search": (BuildContext context) => new Search()
    },
    home: new LoadingPage(), //启动页
  ));
}

//主题数据
final ThemeData _themeData = new ThemeData(
    primaryColor: Color(0xff303030),
    scaffoldBackgroundColor: Color(0xffebebeb),
    cardColor: Color(0xff393a3f));
